home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.object,comp.lang.eiffel,comp.lang.c++,comp.lang.beta,comp.lang.java,comp.lang.sather
- Path: newsfeed.acns.nwu.edu!ftpbox!mothost!schbbs!news
- From: shang@corp.mot.com (David L. Shang)
- Subject: Re: What Should An Exception Handling Do? -- Clarification of rules
- Reply-To: shang@corp.mot.com
- Organization: MOTOROLA
- Date: Mon, 1 Apr 1996 14:56:58 GMT
- Message-ID: <1996Apr1.145658.10876@schbbs.mot.com>
- References: <4jh84e$1b5@ratatosk.uio.no>
- Sender: news@schbbs.mot.com (SCHBBS News Account)
- Nntp-Posting-Host: 129.188.128.126
-
- In article <4jh84e$1b5@ratatosk.uio.no> Jarle Stabell
- <jarle.stabel@dokpro.uio.no> writes:
- > shang@corp.mot.com (David L. Shang) wrote:
- >
- > > result = try do_something()
- > > {
- > > when condition1: some_extraordinary_work1; retry;
- > > when condition2: some_extraordinary_work2; retry;
- > > when condition3: some_extraordinary_work3; retry;
- > > when condition4: return null;
- > > }
- > >
- >
- > I think there's a problem with this "strategy", a user should be able to
- > cancel this kind of operation, here some_extraordinary_work1..3 don't
- > seem to give the user a chance to cancel the operation.
-
- A return statement within some_extraordinary_work1..3 will cancel
- the operation, or a throw statement will kick the ball to a
- catcher outside.
-
- David Shang
-